home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / system / slirp.rea < prev    next >
Encoding:
Text File  |  1995-09-09  |  9.9 KB  |  284 lines

  1. NOTE: there's allready a program called slurp, so I've changed the name to
  2. slirp.  But don't panic, it's still pronounced the same.
  3.  
  4. NOTE: This is an ALPHA release!  There WILL be bugs, so don't put your whole
  5. organisation's IP connectivity through it! (yet) :)
  6.  
  7. What is SLiRP?
  8. --------------
  9.  
  10. SLiRP is a SLIP/CSLIP emulator which allows a normal user with a shell
  11. account on a UNIX system to act like a SLIP/CSLIP account (a-la TIA).
  12.  
  13.  
  14. Some of the features of SLiRP
  15. -----------------------------
  16.  
  17. * It's free
  18.  
  19. * It comes with source
  20.  
  21. * The TCP/IP code is based on 4.4BSD which is widely regarded as a very
  22.   stable and complete implementation.  This means it does all the things
  23.   expected of TCP implementations. eg: slow start, congestion avoidance,
  24.   exponential backoff, round-trip-time calculation, delayed ACKs, Nagle
  25.   algorithm, incoming and outgoing IP fragments, etc. etc. The TCP/IP code 
  26.   was actually taken from the excellent FreeBSD 2.0 sources.  Infact, I went
  27.   out of my way to do as little modification to it as possible.  Most things
  28.   that I regarded as unnecessary (eg: the rfc1323 performance enhancments)
  29.   were simply commented out, so if you want to experiment with them, you can.
  30.  
  31. * Because SLiRP is basically the 4.4BSD TCP/IP code in userland, you can
  32.   easily experiment with the theories of TCP, it's performance etc. without
  33.   having to recompile and reboot a kernel.
  34.  
  35. * SLiRP can redirect ports, so, for example, even though you don't have a real
  36.   address on the Internet (as with all SLIP-emulators) people can still ftp,
  37.   telnet, etc. into your home machine.
  38.  
  39. * Redirection doesn't require a seperately compiled program, like term does
  40.   (with tredir).  It can be done with either a configuration file, or telnet
  41.   while SLiRP is running.
  42.  
  43. * Since nothing needs to be compiled on the client side, it works with any OS
  44.   that can talk SLIP/CSLIP (though, there are programs which you can compile
  45.   on the client end if you want, just to make life easier)
  46.  
  47.  
  48. Planned features:
  49.  
  50. * PPP (I'm gonna steal FreeBSD 2.0's implementation, so it shouldn't take
  51.   too long :)
  52.  
  53. * Compression over a telnet session (One of the reasons I still occasionally
  54.   use term)
  55.  
  56. * trsh-like program, which lets you run multiple shells on the remote-host
  57.   without the need to login multiple times (done)
  58.  
  59. * tupload-like program, which will let you download/upload files without the
  60.   need to login via ftp.
  61.  
  62.  
  63. A little more about SLiRP
  64. -------------------------
  65.  
  66. SLiRP was written because of frustration with term's cumbersome way of
  67. emulating a net-connection (to be fair, term was never written for that
  68. purpose, it's a tribute to Bill Reimers it's come as far as it has), and
  69. with the lack of source and arcane licensing of TIA (lack of source being
  70. the main frustration).
  71.  
  72. Here's a little comparison to put SLiRP in perspective:
  73.  
  74. ... Advantages of SLiRP over term:
  75.  
  76. * Only needs compilation on one side of the link (the remote side)
  77.  
  78. * No need to "port" (termify) software
  79.  
  80. * Can be used by non-UNIX users (DOS/Win/Mac/etc.)
  81.  
  82. * Is more secure
  83.  
  84. * Is easier to use by multiple users (since you're using the kernel's
  85.   networking code, which is already multi-user (well, should be...))
  86.  
  87. ... Advantages of term over SLiRP:
  88.  
  89. * Compression (this is planned in SLiRP.  Infact, I plan to "borrow" the
  90.   compression code from term :)
  91.  
  92. * Term has more complete emulation (see below)
  93.  
  94. * Tupload (working on it)
  95.  
  96. ... Advantages of SLiRP over TIA:
  97.  
  98. * Its free
  99.  
  100. * Comes with source
  101.  
  102. * Its free
  103.  
  104. * Comes with source
  105.  
  106. * Its free
  107.  
  108. * Comes with source
  109.  
  110. I'm sure there are other advantages, but those are the main ones :)
  111.  
  112. * CSLIP (can TIA do this?)
  113.  
  114. (Don't know enough about TIA to list anymore...)
  115.  
  116. ... Advantages of TIA over SLiRP:
  117.  
  118. * Support (although, most of the TIA FAQ's could in theory apply to SLiRP as
  119.   well.. especially the DOS/Win/Mac FAQ's)
  120.  
  121. * TIA has been ported to more OS's (working on it)
  122.  
  123. * Stability.  TIA is more mature than SLiRP. (working on it)
  124.  
  125. (Don't know enough about TIA to list anymore...)
  126.  
  127.  
  128. How to run SLiRP
  129. ----------------
  130.  
  131. First, compile SLiRP according to the instructions in the file INSTALL.
  132. Then all you need to do is run "slirp", quit your comms software (or disable
  133. it, or whatever) and run your SLIP/CSLIP software on your home machine.
  134.  
  135.  
  136. Which programs do not work over SLiRP?
  137. --------------------------------------
  138.  
  139. Any programs that bind() a port, then tell the other end of the connection
  140. where they should connect() to this bound port.
  141.  
  142. For example: when you "get" a file during an ftp session, the ftp client
  143. bind()'s a socket, has a look at which port the socket is bound to, then
  144. tell's the ftp server the address and port of this socket (with the PORT
  145. command). The ftp server then connect()'s to this address/socket pair.
  146.  
  147. Now, since your machine isn't really on the Internet, this connect() request
  148. will not arrive to your host, so it will not work.
  149.  
  150. SLiRP emulates this by bind()ing it's own port on the server that *is* on
  151. the internet, and tells the ftp server about *that* address/socket pair.
  152. When the server connect()'s to it, SLiRP will then connect back to your
  153. machine.
  154.  
  155. Currently, ftp (PORT) and irc (DCC SEND and DCC CHAT) are emulated, since
  156. these are the only programs I use which require this emulation. [I'm also
  157. working on "talk", but it's not finished yet]
  158.  
  159. If you have a program that does not work with SLiRP, you can do one of 2
  160. things:
  161.  
  162. * Find out the format of the "command" and write the code to do a similar 
  163.   type of translation as is currently done by SLiRP.  See the funcions
  164.   tcp_emu() and tcp_tos() to see how this is done.
  165.  
  166. * If you can't do the above, and you have the sources to the program, you
  167.   can recompile it with XXX included in the SLiRP package (XXX actually, I
  168.   havn't written this yet..)
  169.  
  170.  
  171. How do I redirect a port?
  172. -------------------------
  173.  
  174. Say you want to let your friend ftp to your home machine.  Because your home
  175. machine isn't really on the Internet, they can't ftp into it directly.  You
  176. need to redirect a port from the host machine (where SLiRP is running) to
  177. your home machine.
  178.  
  179. There are 2 ways of doing this:
  180.  
  181. 1) Put a line in your config file like the following:
  182.  
  183. redir tcp [port to redirect] [your home IP address]:[port to redirect to]
  184.  
  185. For example, if you want to redirect port 5000 to port 21 on your home
  186. machine (ftp port), and your home machine's IP is 123.123.123.123, you'd have:
  187.  
  188. redir tcp 5000 123.123.123.123:21
  189.  
  190. Now, your friend can "ftp host.SLiRP.is.running.on 5000" and she'll be
  191. ftp-ing to your home machine.
  192.  
  193. The second way is shown below...
  194.  
  195.  
  196. Controlling SLiRP using telnet
  197. ------------------------------
  198.  
  199. Redirection (and other misc. config stuff) can be done on the fly by
  200. telneting to a specific C class address. (Currently, 192.0.2.x)
  201.  
  202. All you need to do is telnet to 192.0.2.0, which will give you a
  203. "command-line" where you can enter commands directly to SLiRP.  Most of the
  204. config-file options are supported, the only ones that aren't are the ones
  205. which would crash SLiRP (eg: increasing the MTU on-the-fly will crash SLiRP)
  206.  
  207. There are also aditional ones:
  208.  
  209. stats [ mbuf | ip | udp | tcp | udpsock | tcpsock ]
  210.  
  211.     Show statistics on [ ... ].
  212.     
  213. close N
  214.  
  215.     Close the session which has FD N.
  216.     
  217. kill N
  218.  
  219.     Kill the session which has FD N.
  220.  
  221. And others.  Type "help" to see them all (most).
  222.  
  223. Notes
  224. -----
  225.  
  226. * Type "slirp -h" for a list of command-line options.
  227.  
  228. * The C class address 192.0.2.xxx is a special address to SLiRP.
  229.   192.0.2.0 - SLiRP "command line"
  230.   192.0.2.1 - An alias for the remote-host, -e and -p programs will be run
  231.           on connection to the specified port.
  232.   192.0.2.2 - An alias for the remote-host, but no -e, -p programs are
  233.           executed.
  234.           
  235.   The difference between the last 2 are subtle, but distinct; for example,
  236.   by default, when you telnet to 192.0.2.1 port 21 (telnet port) you'll
  237.   automatically get a shell instead of a login prompt.  But if you telnet to
  238.   192.0.2.2, you'll get the login prompt as offered by the remote-host.
  239.  
  240. * To quit SLiRP you simple kill your SLIP/CSLIP software then send 5 0's
  241.   (zeros) down the line, with a 1/2 second pause between each.
  242.  
  243. * The code to try and "guess" how much it can write to the modem is flakey.
  244.   If you see that your modem isn't being used at it's maximum capacity (eg:
  245.   an ftp session to the remote-host, the modem's RECEIVE light is not
  246.   shining brightly all the time), you might want to increase the baudrate by
  247.   using the -b BAUDRATE command-line option.  If you choose a number which
  248.   is far greater than the actuall baud rate, SLiRP will write to the modem
  249.   as fast as the OS allows, hence you'll get the maximum bandwidth.
  250.   However, there will be a noticable increase in lag for interactive data
  251.   (eg: a telnet session).  (the -b BAUDRATE option has nothing to do with
  252.   the actual baudrate, it's simply a guide for slirp so that interactive
  253.   sessions are responsive)
  254.  
  255. * SLiRP was written in an xterm which is 110x35 characters in size.  I just
  256.   had a look at portions of the source through an 80x25 character console.  It
  257.   is NOT pretty! :)  Apoligies to the xterm-deficient.
  258.  
  259. * You can choose any IP you wish for your home machine, except the following:
  260.  
  261.   - Any weird IP address which has some meaning to IP, like 255.255.255.255,
  262.     0.0.0.0, 127.0.0.1 (infact, all 127.xxx.yyy.zzz), etc., etc.
  263.  
  264. * PING does NOT yet work, so don't use ping to test the link.  Use
  265.   telnet 192.0.2.0 instead.  This should give a "SLiRP command-line ready."
  266.   message.  If not, then the link is not working.  If you can't telnet/ftp
  267.   to a hostname, then your DNS entry is wrong.
  268.  
  269.  
  270. How to contact the author
  271. -------------------------
  272.  
  273. If you have any suggestions, additions, patches, questions, comments, liquor
  274. you can e-mail me at danjo@blitzen.canberra.edu.au.
  275.  
  276. You can ftp SLiRP updates and patches from blitzen.canberra.edu.au in
  277. /put/slirp.
  278.  
  279. There's also a WWW page (under construction) at
  280. http://blitzen.canberra.edu.au/~danjo.  I'll put the latest information on
  281. SLiRP on this WWW page, so please check this page before e-mailing me.  (Of
  282. course, if you need SLiRP to work to be able to use
  283. Mosaic/Netscape/whatever, then you better e-mail me instead)
  284.